package com.church.action;

import com.church.services.QandaServices;
import com.opensymphony.xwork2.ActionSupport;

public class AddAnswer extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 31L;
	private QandaServices qandaServices;
	private String teacher;
	private String answer;
	private long id;
	private String response;
	public QandaServices getQandaServices() {
		return qandaServices;
	}
	public void setQandaServices(QandaServices qandaServices) {
		this.qandaServices = qandaServices;
	}
	public String getTeacher() {
		return teacher;
	}
	public void setTeacher(String teacher) {
		this.teacher = teacher;
	}
	public String getAnswer() {
		return answer;
	}
	public void setAnswer(String answer) {
		this.answer = answer;
	}
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	
	public String getResponse() {
		return response;
	}
	public void setResponse(String response) {
		this.response = response;
	}
	public String execute() {
		response=qandaServices.answer(id, teacher, answer);
		return response;
	}
}
